<template>
  <div>
    <div class="topBar">
      <div class="left iconfont icon-fenlei"  @click="showPopup"></div>
      <div class="center"></div>
      <div class="right"></div>
    </div>
    <van-popup v-model="show" position="left" :style="{ width: '40%',height:'100%' }">

    <el-menu
      default-active="/"
      router
      class="el-menu-vertical-demo"
      @select="select">
     <el-menu-item :index="item.path" v-for="(item,i) in adminList" :key="i">
        <span slot="title">{{item.title}}</span>
      </el-menu-item>
    </el-menu>

    </van-popup>
  </div>
</template>

<script>
import {adminList} from '../router/index'
 export default {
  data() {
    return {
      show: false,
      adminList
    };
  },
  methods: {
    showPopup() {
      this.show = true;
    },
    select(){
      this.show = false
    }
  }
};
</script>

<style scoped>
.topBar{
  height: 0.8rem;
  display: flex;
  align-items: center;
  border-bottom: 0.02rem solid #f1f1f1;
}
.left,.center,.right{
  flex: 1; 
}
.left{
font-size: 0.48rem;
text-indent: 0.3rem;
}
.el-menu-item{
  min-width: 0 !important;
}
</style>